package PontoEletronico;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MostraDataHora implements Runnable{
	private Boolean power = true;
	
	public MostraDataHora(){}
	
	@Override
	public void run() {
		try{
			while(power==true){
				Principal.displayDataHora.setText(new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new Date(System.currentTimeMillis())));		
				Thread.sleep(1000);
			}
		}catch (InterruptedException e){}
	}
}
